Component({
  mixins: [],
  data: {
    imgSrc:'https://rhi0.xiyun.net/zhuandian/',
    actOpentwo:false,
  },
  props: {
  },
  didMount() {
    let that = this;
    let date = new Date();
    if(my.getStorageSync({key:'inJoinTime'}).data){
      let today = date.getFullYear() +'-'+ date.getMonth() +'-'+ date.getDate();
      let ago = my.getStorageSync({key:'inJoinTime'}).data;
      if(today != ago){
        that.setData({
          actOpentwo:true
        })
      }else{
        that.setData({
          actOpentwo:false
        })
      }
    }else{
      that.setData({
        actOpentwo:true
      })
    }
  },
  didUpdate() {},
  didUnmount() {
    this.setData({
      actOpentwo:false,
    })
  },
  methods: {
    onShare(){
      this.props.onShare();
    },
    closeJoin(){
      this.setData({
        actOpentwo:false,
      })
      my.removeStorageSync({key: 'inJoinTime' });
      let date = new Date();
      let today = date.getFullYear() +'-'+ date.getMonth() +'-'+ date.getDate();
      my.setStorage({key:'inJoinTime',data:today})
    },
  },
});
